Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributions:
Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributions
Description
Kullback-Leibler divergence and Bhattacharyya distance between two Dirichlet distributions.
Usage
kl.diri(a, b, type = "KL")
Arguments
a
A vector with the parameters of the first Dirichlet distribution.
b
A vector with the parameters of the second Dirichlet distribution.
type
A variable indicating whether the Kullback-Leibler divergence ("KL") or the Bhattacharyya distance ("bhatt") is to be computed.
Value
The value of the Kullback-Leibler divergence or the Bhattacharyya distance.
Details
Note that the order is important in the Kullback-Leibler divergence, since this is asymetric, but not in the Bhattacharyya distance, since it is a metric.
References
Ng Kai Wang, Guo-Liang Tian and Man-Lai Tang (2011). Dirichlet and related distributions: Theory, methods and applications. John Wiley & Sons.